package com.tanhua.model.vo;

import com.tanhua.model.domain.UserInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author Xiao
 * @version 1.0
 * @description 附近用户VO
 * @date 2021/10/31
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class NearUserVO implements Serializable {
    private Long userId;
    private String avatar;
    private String nickname;

    public static NearUserVO init(UserInfo userInfo) {
        NearUserVO nearUserVO = new NearUserVO();
        nearUserVO.setUserId(userInfo.getId());
        nearUserVO.setAvatar(userInfo.getAvatar());
        nearUserVO.setNickname(userInfo.getNickname());
        return nearUserVO;
    }
}
